home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group02b.txt
/
000010_icon-group-sender_Fri Aug 16 16:15:17 2002.msg
< prev
next >
Wrap
Internet Message Format
|
2003-01-02
|
3KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id g7GNFEI23155
for icon-group-addresses; Fri, 16 Aug 2002 16:15:14 -0700 (MST)
Message-Id: <200208162315.g7GNFEI23155@baskerville.CS.Arizona.EDU>
From: Jesse Tov <tov@fas.harvard.REMOVE.edu>
X-Newsgroups: comp.lang.icon
Subject: Re: What about "Expressions?" (was Re: Icon Wish List)
Date: 16 Aug 2002 17:42:06 GMT
User-Agent: slrn/0.9.7.4 (Linux)
To: icon-group@cs.arizona.edu
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Gene Kahn <jenjhiz@yahoo.com>:
> previous statements. On the other hand, in reading s-expression
> languages like Lisp and Scheme, I find that I have to hold in my mind
> too many _unstated_ intermediate results before I find what the
> expression is all about. (One could argue that this may be due more to
> bad code, i.e., irresponsible use of deep embedding, than to intrinsic
> properties of s-expressions).
I would argue that it's bad code. That's what "let" ("let"
in ML, "let*" in Scheme) is for. (I don't know Lisp well
enough, but I bet there's something equivalent.)
> Compare the readability of these chunks
> of code:
>
> FORTRAN-like
> The man kicked the dog.
> The dog chased the cat.
> The cat bit the mouse.
> The mouse died.
>
> LISP-like (in infix notation)
> The mouse the cat the dog the man kicked chased bit died.
ML-like
The man kicked the dog
which chased the cat
which bit the mouse
which died.
(OK, so "let" to "which" is sort of a stretch, but "which"
lets you stop remembering everything and encapsulate it as a
temporary variable, a "pronoun," if you will. It makes the
sentence right-branching, and thus easier to read.)
> Speaking of speaking (or writing) grammatical English, which skill has
> been implied in a recent post as a 'requisite' for programming, what
> do readers with good English grammar think of this sentence:
> grammatically correct or not? Be careful with your answer. Your
> reputation as a programmer is on the line.
>
> The horse raced past the barn collapsed.
Well, I can't find any way to parse it that has the barn collapsing
rather than the horse. In my dialect, it's is equivalent to
The horse which was raced past the barn collapsed.
and is perfectly grammatical. However, I know in some people's
dialects (my grandfather, from eastern Pennsylvania), it's more like:
The horse which raced past the barn collapsed.
When I hear it like this, it's ungrammatical to me.
Jesse
--
"A hungry man is not a free man." --Adlai Stevenson